package com.xiaoyu.awakening.ai.control.entity.dto;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * AwkCompletionsUsage
 *
 * @author wangxiaoyu
 * @date 2024/7/5 17:12
 * @since v1.0
 */
@NoArgsConstructor
@Data
public class AwkCompletionsUsage {
    @JsonProperty(
            value = "completion_tokens",
            required = true
    )
    private int completionTokens;
    @JsonProperty(
            value = "prompt_tokens",
            required = true
    )
    private int promptTokens;
    @JsonProperty(
            value = "total_tokens",
            required = true
    )
    private int totalTokens;

    @JsonCreator
    private AwkCompletionsUsage(@JsonProperty(value = "completion_tokens", required = true) int completionTokens, @JsonProperty(value = "prompt_tokens", required = true) int promptTokens, @JsonProperty(value = "total_tokens", required = true) int totalTokens) {
        this.completionTokens = completionTokens;
        this.promptTokens = promptTokens;
        this.totalTokens = totalTokens;
    }
}
